package xyz.zeer.endangeredanimal;

import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class ImageActivity extends AppCompatActivity {

    ImageView yrs_image;
    ImageButton yrs_back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.yrs_activity_image);
        yrs_image = findViewById(R.id.imageViewFull);
        yrs_back = findViewById(R.id.imageButtonLast);

        final Intent i = getIntent();
        if(i.getExtras() != null)
        {
            int imageResource = i.getIntExtra("Image", R.drawable.javan_rhino);
            yrs_image.setImageResource(imageResource);
        }

        yrs_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ImageActivity.this.finish();
            }
        });
    }
}
